import request from '@/utils/request'


// 根据科室选择对应的医生、护士、床位
export function listDoctor(deptId) {
  return request({
    url: '/hospital/hosptilnews/list2/' + deptId,
    method: 'get'
  })
}

// 查询所有的科室
export function listDepts() {
  return request({
    url: '/hospital/hosptilnews/selAllDept',
    method: 'get'
  })
}

// 查询住院信息表列表
export function listHosptilnews(query) {
  return request({
    url: '/hospital/hosptilnews/list',
    method: 'get',
    params: query
  })
}

// 查询住院信息表详细
export function getHosptilnews(hosptilId) {
  return request({
    url: '/hospital/hosptilnews/' + hosptilId,
    method: 'get'
  })
}

// 新增住院信息表
export function addHosptilnews(data) {
  return request({
    url: '/hospital/hosptilnews',
    method: 'post',
    data: data
  })
}

export function showOne(data) {
  return request({
    url: '/hospital/hosptilnews/selOne',
    method: 'post',
    data: data
  })
}
// 修改住院信息表
export function updateHosptilnews(data) {
  return request({
    url: '/hospital/hosptilnews',
    method: 'put',
    data: data
  })
}

// 删除住院信息表
export function delHosptilnews(hosptilId) {
  return request({
    url: '/hospital/hosptilnews/' + hosptilId,
    method: 'delete'
  })
}

// 出院
export function delHosptilnews2(hosptilId) {
  return request({
    url: '/hospital/hosptilnews/goOut/' + hosptilId,
    method: 'delete'
  })
}
